package com.ibl.rover.lite.service.utill;

import java.util.ArrayList;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class Core {

	

	public static class COMMON_TAGS {
		public static final String head = "head";
		public static final String body = "body";
		public static final String SyncXml = "SyncXml";
		public static final String responseCode = "responseCode";
		public static final String responseMessage = "responseMessage";
	}
	
	
	public static class USER_TAGS {
		public static final String TAG_USER_INFO = "UserInfo";
		public static final String USER_NAME = "USER_NAME";
		public static final String IMEI = "IMEI";
	}
	
	public static class SST_TAGS{
		public static final String PRODUCT_CATEGORY = "PRODUCTCATEGORY";
		public static final String PRODUCT = "PRODUCT";
		public static final String APPSETUP = "APPSETUP";
		public static final String CUSTOMERS = "CUSTOMERS";
		public static final String ROUTE = "ROUTE";
		public static final String ORDER = "ORDER";
	}
	
	public static class APPSETUP {
		public static final String LAST_ORDER_NO = "LAST_ORDER_NO";
		public static final String TSO_NAME = "TSO_NAME";
		

	}
	
	public static class PRODUCTCATEGORY {
		public static final String CATEGCODE = "CATEGCODE";
		 
   }
	
	public static class ROUTE {
		public static final String xDay = "xDay";
		public static final String xRoute = "xRoute";
		 
   }

	public static class PRODUCT {
		public static final String BRANDCODE = "BRANDCODE";
		public static final String CATEGCODE = "CATEGCODE";
		public static final String FULLDESC = "FULLDESC";
		public static final String UNITPRICE = "UNITPRICE";
		public static final String CODE = "CODE";
		public static final String DISP_SEQ = "DISP_SEQ";
	}

	
	public static class CUSTOMER {
		public static final String ADDRESS = "ADDRESS";
		public static final String CLASS_CODE = "CLASS_CODE";
		public static final String CODE = "CODE";
		public static final String CREDIT_LIMIT = "CREDIT_LIMIT";
		public static final String NAME = "NAME";
		public static final String ROU_NUMBER = "ROU_NUMBER";
		public static final String POSITION = "POSITION";
    }
	
	 public static class CONSTANT {
		 public static final String toDateTimeFormat="dd-MM-yyyy";
		 public static final String fromDateTimeFormat="dd-MMM-yyyy";
		 
		 
	 }
	
	
	public static void setAttribute(ArrayList<String> columnName,
			ArrayList<String> value, Element itemElement,Document doc) {

		for (int i = 0; i < columnName.size(); i++) {
			Element attributeElement = doc.createElement("attribute");
			itemElement.appendChild(attributeElement);
			attributeElement.setAttribute("name", columnName.get(i));
			attributeElement.setAttribute("value", value.get(i));

		}
	}	
}
